package io.gitee.zicai.graphql.sample.config;

import com.querydsl.jpa.impl.JPAQueryFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.persistence.EntityManager;

/**
 * QueryDslConfig
 *
 * @author zicai
 * @since 2021-04-09
 */
@Configuration
public class QueryDslConfig {

    @Bean
    public JPAQueryFactory dsl(EntityManager entityManager) {
        return new JPAQueryFactory(entityManager);
    }
}
